ποΈGitΠ―ΡΠ°ποΈ
.github/copilot-instructions.md 97ce3cd27f7edc7f2480bc0c8bc4fb572d2d3fc1 (97ce3cd2) Text, 2.82 KB
Tc9d1d9# Meshtastic Android β Copilot Instructions
Tff7b72> **Full rules**: `AGENTS.md` is the source of truth. This file is a compact quick-reference for build commands and task naming. For architecture, conventions, and workflow details, consult `AGENTS.md` and the `.skills/` playbooks.
Tc9d1d9## Build, Test & Lint
**Requires:** JDK 21, Ta5d6ff`ANDROID_HOME` set, proto submodule initialized.
Ta5d6ff```Ta5d6ffbash
T8b949e# Bootstrap (run once per fresh clone)
git submodule update --init
Tff7b72[ -f local.properties Tff7b72] Tff7b72|| cp secrets.defaults.properties local.properties
T8b949e# Full local verification (formatting β lint β compile β tests)
./gradlew spotlessApply detekt assembleDebug Tffa657test allTests
T8b949e# Single module tests (KMP module)
./gradlew :core:data:allTests
T8b949e# Single module tests (Android-only module like :app)
./gradlew :androidApp:testFdroidDebugUnitTest
T8b949e# Cross-platform compilation check (no tests)
./gradlew kmpSmokeCompile
T8b949e# Flavor-specific lint
./gradlew lintFdroidDebug lintGoogleDebug
Ta5d6ff```
Tff7b72> Both `test` AND `allTests` are needed. `allTests` covers KMP modules; `test` covers pure-Android modules. Neither alone catches everything.
Tc9d1d9### Gradle task naming (KMP vs Android-only)
KMP modules have different task names than pure-Android modules. Using the wrong name silently skips tests or fails resolution.
| Intent | KMP modules (Ta5d6ff`core:*`, Ta5d6ff`feature:*`) | Android-only (Ta5d6ff`app`, Ta5d6ff`core:api`, Ta5d6ff`core:barcode`) |
|--------|--------------------------------------|--------------------------------------------------|
| Run tests | Ta5d6ff`:module:allTests` | Ta5d6ff`:module:testFdroidDebugUnitTest` |
| Detekt | Ta5d6ff`:module:detekt` (lifecycle task) | Ta5d6ff`:module:detekt` |
| Compile check | Ta5d6ff`:module:compileKotlinJvm` | Ta5d6ff`:module:compileFdroidDebugKotlin` |
**Common mistakes:**
Tff7b72- β Ta5d6ff`:core:network:detektMain` β does not exist in KMP; variants are Ta5d6ff`detektJvmMain`, Ta5d6ff`detektMetadataCommonMain`, etc. Use Ta5d6ff`:core:network:detekt` instead.
Tff7b72- β Ta5d6ff`:feature:connections:testDebugUnitTest` β ambiguous in KMP modules. Use Ta5d6ff`:feature:connections:allTests`.
Tff7b72- β Ta5d6ff`:feature:connections:compileFdroidDebugKotlin` β wrong for KMP. Use Ta5d6ff`:feature:connections:compileKotlinJvm` or Ta5d6ff`kmpSmokeCompile`.
Tc9d1d9## Quick Reference
Tff7b72- **Architecture**: KMP project (Android, Desktop, iOS). Business logic in Ta5d6ff`commonMain`; platform shells (Ta5d6ff`androidApp/`, Ta5d6ff`desktopApp/`) wire DI and host UI.
Tff7b72- **Flavors**: Ta5d6ff`fdroid` (OSS) / Ta5d6ff`google` (Maps + DataDog). Only one installable at a time (different signing keys).
Tff7b72> See `AGENTS.md` for full rules (verify before push, branch naming, protos, coding conventions).
Tff7b72> Contextual `.github/instructions/` files enforce conventions scoped to relevant source sets.
<!-- SPECKIT START -->
For additional context about technologies to be used, project structure,
shell commands, and other important information, read the current plan
<!-- SPECKIT END -->
Served by rngit 1.5.4 - Generated in 0.05s